/**
 * 
 */
package com.lanswon.common.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author lanswon
 *
 */
public class PropertiesUtils {

	private static Properties pros = null;// Properties Object

	/**
	 * Loading files to Properties object
	 * 
	 * @param fileName
	 */
	public static void load(String fileName) {
		pros = new Properties();// Create a Properties object
		
		
		InputStream in = PropertiesUtils.class.getResourceAsStream(fileName);
		try {
			pros.load(in);// Load the file Properties to flow to the object
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	/**
	 * 
	 * @param key
	 * @return
	 */
	public static String get(String key) {
		return pros.getProperty(key.toUpperCase());// Through the key specific get attribute value
	}
}
